// User types
export interface User {
  id: string
  email: string
  name: string
  avatar?: string
  role: 'USER' | 'ADMIN'
  createdAt: Date
  updatedAt: Date
}

// Category types
export interface Category {
  id: string
  name: string
  description?: string
  icon?: string
  createdAt: Date
  updatedAt: Date
}

// Tool types
export interface Tool {
  id: string
  title: string
  description: string
  url: string
  image?: string
  categoryId: string
  userId: string
  status: 'PENDING' | 'APPROVED' | 'REJECTED'
  isDeployed?: boolean
  deployPath?: string
  createdAt: Date
  updatedAt: Date
  category?: Category
  user?: User
  reviews?: Review[]
  favorites?: Favorite[]
  _count?: {
    reviews: number
    favorites: number
  }
}

// Review types
export interface Review {
  id: string
  toolId: string
  userId: string
  rating: number
  comment?: string
  createdAt: Date
  updatedAt: Date
  tool?: Tool
  user?: User
}

// Favorite types
export interface Favorite {
  id: string
  toolId: string
  userId: string
  createdAt: Date
  tool?: Tool
  user?: User
}

// API Response types
export interface ApiResponse<T> {
  success: boolean
  data?: T
  error?: string
  message?: string
}

// Form types
export interface CreateToolForm {
  title: string
  description: string
  url: string
  image?: string
  categoryId: string
}

export interface CreateCategoryForm {
  name: string
  description?: string
  icon?: string
}

export interface CreateReviewForm {
  toolId: string
  rating: number
  comment?: string
}
